-
Notifications
You must be signed in to change notification settings - Fork 207
[WIP] Use haskell-lsp with VFS race condition fix #1446
Conversation
|
||
-- The commands to be executed on the server. | ||
-- If you set `executeCommandHandler`, you **must** set this. | ||
, Core.executeCommandCommands = Just commandIds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if these are set up correctly, please provide input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know either is this @bubba who changed it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a branch for these options, I'll apply it on top of this after this is merged /~https://github.com/bubba/haskell-ide-engine/tree/new-haskell-lsp-options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me but no changes would have had to have been made if VIrtualFile
was abstract and there was an accessor to extract the Text
.
@@ -275,7 +275,7 @@ readVFS :: (MonadIde m, MonadIO m) => Uri -> m (Maybe T.Text) | |||
readVFS uri = do | |||
mvf <- getVirtualFile uri | |||
case mvf of | |||
Just (VirtualFile _ txt _) -> return $ Just (Rope.toText txt) | |||
Just (VirtualFile _ txt) -> return $ Just (Rope.toText txt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make VirtualFile
more abstract and provide an accessor to get the text out (I have this on my dejafu branch).
(Just (VFS.VirtualFile _ yitext _), Just fp) -> do | ||
let text' = Rope.toString yitext | ||
(Just (VFS.VirtualFile _ rope), Just fp) -> do | ||
let text' = Rope.toString rope |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
@@ -798,7 +799,7 @@ withDocumentContents reqId uri f = do | |||
(J.responseId reqId) | |||
J.InvalidRequest | |||
"Document was not open" | |||
Just (VFS.VirtualFile _ txt _) -> f (Rope.toText txt) | |||
Just (VFS.VirtualFile _ txt) -> f (Rope.toText txt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here..
|
||
-- The commands to be executed on the server. | ||
-- If you set `executeCommandHandler`, you **must** set this. | ||
, Core.executeCommandCommands = Just commandIds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know either is this @bubba who changed it?
Closed in favour of #1457 |
Use work @mpickering has done to get rid of race conditions in VFS
Do not merge, this is a test branch, to confirm operation prior to publishing new
haskell-lsp
andlsp-test
modules.